home *** CD-ROM | disk | FTP | other *** search
- VERSION 1.0 CLASS
- BEGIN
- MultiUse = -1 'True
- END
- Attribute VB_Name = "PrintedLabel"
- Attribute VB_Creatable = False
- Attribute VB_Exposed = False
- Option Explicit
- Public lblX%
- Public lblY%
- Public lblCaption$
- 'Refinements on this welcome and please let me know about
- 'them at 102251,3060@compuserve.com.
-
-
-
- Public Static Property Get X()
- X = lblX
- End Property
-
- Public Static Property Let X(vNewValue)
- lblX = vNewValue
- End Property
-
- Public Static Property Get Y()
- Y = lblY
- End Property
-
- Public Static Property Let Y(vNewValue)
- lblY = vNewValue
- End Property
-
- Public Static Property Get Caption()
- Caption = lblCaption
- End Property
-
- Public Static Property Let Caption(vNewValue)
- lblCaption = vNewValue
- End Property
-
- Private Sub Class_Initialize()
- lblNum = lblNum + 1 'Counter for label number
- lblX = 0
- lblY = 0
- lblCaption = "Label" & lblNum
- End Sub
-
-
-
- Public Function PrintLabel(DestFrm As Form) As Boolean
- Attribute PrintLabel.VB_Description = "Prints text on the form like a label."
- On Error GoTo PLClsErr
-
- DestFrm.CurrentX = lblX
- DestFrm.CurrentY = lblY
- DestFrm.Print lblCaption
- PrintLabel = True
- Exit Function
-
- PLClsErr:
- MsgBox Err.Description
- PrintLabel = False
- Exit Function
-
- End Function
-